home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / UTIL / Alpha 6.5.sit / Help / Adding and Removing Modes next >
Text File  |  1996-07-19  |  2KB  |  56 lines

  1.  
  2.     Adding a New Mode or Menu to Alpha
  3.     
  4.     
  5. These instructions pertain to all versions of Alpha greater than or equal 
  6. to 6.2b6.
  7.  
  8.  
  9. To add a mode to Alpha, a file ending w/ 'Mode.tcl' must be created and 
  10. placed in the ":Tcl:modes" directory.
  11.  
  12. The structure of this file is *very* important. Alpha will automatically 
  13. load *at startup* every such file. The file should begin w/ a construct of 
  14. the following form:
  15.  
  16.     if {$startingUp} {
  17.         addMode Perl dummyPerl {*.pl *.ph *.pm} perlMenu
  18.         addMenu perlMenu
  19.         return
  20.     }
  21.  
  22.  
  23. Alpha sets 'startingUp' while loading the mode files at startup. All five 
  24. of these lines are important. 
  25.  
  26. 'addMode <mode> <dummyProc> <suffixes> <menus>' defines a new mode. When
  27.     trying to switch to the Perl mode, Alpha will attempt to execute the 
  28.     function 'dummyPerl'. The suffixes allow Alpha to automatically determine 
  29.     the correct mode of a newly opened file.
  30.  
  31. 'addMenu <mname>' defines a new menu, which can be used in any mode. 
  32.     'mname' must actually be a variable which contains (will contain) the 
  33.     real menu name, i.e. perlMenu is actually a variable that is defined in 
  34.     other perl files to be "・132".
  35.  
  36.  
  37. Always "Rebuild Tcl Indices" from the Tcl menu after adding
  38. or deleting files! Then restart.
  39.  
  40. Other functions of note for mode creators:
  41.  
  42. 'newModeVar <mode> <varname> <initial value> <boolean>' - Creates new 
  43.     per-mode variables that are saved across restarts. 
  44.  
  45. 'regModeKeywords' - See other docs.
  46.  
  47. The 'dummyProc' array is now ignored.
  48.  
  49. ===============================================================================
  50.  
  51. The 'Deconstructノ' menu item under Config allows modes and
  52. menus to be removed from Alpha. See here.
  53.  
  54. ===============================================================================
  55.  
  56.